package com.ljkj.blockpay.network;

import com.ljkj.blockpay.model.CommonModel;
import com.ljkj.blockpay.model.RechargeModel;
import com.ljkj.blockpay.model.UserModel;
import com.ljkj.blockpay.network.response.BaseListResponse;
import com.ljkj.blockpay.network.response.BaseResponse;

import java.util.List;
import java.util.Map;

import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by yp on 2022/3/10
 */
public interface ApiService {

    //获取验证码
    @POST(ApiToCConfig.URL_SEND_CODE)
    Single<BaseResponse<UserModel>> getCode(@Body Map<String, Object> params);

    //获取国家地区代码
    @GET(ApiToCConfig.URL_COUNTRY_CODE)
    Single<BaseResponse<List<CommonModel>>> getValidateCode();

    //用户注册
    @POST(ApiToCConfig.USER_REGISTER)
    Flowable<BaseResponse<String>> userRegister(@Body Map<String, Object> params);

    //用户登录
    @POST(ApiToCConfig.USER_LOGIN)
    Single<BaseResponse<UserModel>> userLogin(@Body Map<String, Object> params);

    //业务场景支持币种and网络精度
    @POST(ApiToCConfig.URL_TRADE_NETWORK_ACCURACY)
    Single<BaseListResponse<RechargeModel>>  getNetAccuracy(@Query("orderType")String orderType);


}
